﻿<UserControl
    x:Class="IGL_Talk_Win8.Controls.StatusControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:IGL_Talk_Win8.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="300"
    d:DesignWidth="400"
    Width="Auto"
    Height="Auto">

    <Grid Background="#d1d1d1">
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="50" />
        </Grid.RowDefinitions>
        <TextBlock x:Name="txtUser"
                   Text="{Binding Path=UserName}"
                   Grid.Row="0"
                   FontSize="32"
                   HorizontalAlignment="Center"
                   VerticalAlignment="Center"
                   TextWrapping="WrapWholeWords"
                   Foreground="Black" />
        <StackPanel Orientation="Horizontal"
                    Grid.Row="1"
                    HorizontalAlignment="Center">
            <Button x:Name="cmdLogIn"
                    x:Uid="Status_LogIn"
                    Content="Log in"
                    Margin="0,0,30,0"
                    IsEnabled="{Binding Path=NotConnected}"
                    Foreground="Black"
                    BorderBrush="Black">
                <Button.Flyout>
                    <Flyout x:Name="flyoutLogin">
                        <local:LoginForm x:Name="loginForm" />
                    </Flyout>
                </Button.Flyout>
            </Button>
            <Button x:Name="cmdLogOut"
                    x:Uid="Status_LogOut"
                    Content="Log out"
                    IsEnabled="{Binding Path=Connected}"
                    Margin="30,0,0,0"
                    Click="cmdLogOut_Click"
                    Foreground="Black"
                    BorderBrush="Black" />
        </StackPanel>
    </Grid>
</UserControl>